﻿//////////////////////////////////////////////////////////////////////////////////////////////////////
//Name: Bartosz
//FullName: Adamczewski
//Project: InternalClasses
//Component:
//StartDate: 2009-08-17 19:29:04
//EndDate: 2009-08-17 19:29:04
//Rights:  Copyright (c) Bartosz Adamczewski
/////////////////////////////////////////////////////////////////////////////////////////////////////

#region imports.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

#endregion

namespace InternalClasses.Context
{
    /// <summary>
    /// The IContext interface that is a container that uses the attributed programming
    /// pattern. Every class that implements the IContext should provide attributed programming.
    /// </summary>
    public interface IContext
    {
        /// <summary>
        /// Registers the class and the interface it implements in the context.
        /// </summary>
        /// <typeparam name="TClass">The type of the class.</typeparam>
        /// <typeparam name="TInterface">The type of the interface.</typeparam>
        void Register<TClass, TInterface>();

        /// <summary>
        /// Gets an object implementing the TInterface from context.
        /// </summary>
        /// <typeparam name="TClass">The type of the class.</typeparam>
        /// <typeparam name="TInterface">The type of the interface.</typeparam>
        /// <returns></returns>
        TInterface GetFromContext<TClass, TInterface>() where TInterface : class;
    }
}